using System;
using System.Collections.Generic;

namespace Voodoo.Sauce.Internal.Analytics.Trackers
{
	[Serializable]
	public class TrackersParams
	{
		public string event_name;

		public Dictionary<string, string> parameters;

		public override string ToString()
		{
			string str = "?";
			if (!string.IsNullOrEmpty(event_name))
			{
				str = str + "event_name=" + event_name;
				{
					foreach (KeyValuePair<string, string> parameter in parameters)
					{
						if (!string.IsNullOrEmpty(parameter.Key))
						{
							str += $"&{parameter.Key}={parameter.Value}";
						}
					}
					return str;
				}
			}
			throw new Exception("Parameter: event_name is mandatory.");
		}
	}
}
